package com.ruoyi.business.domain.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.validate.AddGroup;
import com.ruoyi.common.validate.EditGroup;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.math.BigDecimal;

/**
 * 店铺对象 tb_store
 * 
 * @author ruoyi
 * @date 2025-07-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Table("tb_store")
public class TbStore extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /** 店铺id */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /** 店长用户id */
    @Excel(name = "店长用户id")
    private Long userId;

    /** 店铺名称(数字、中文，英文(可混合，不可有特殊字符)，可修改)、不唯一 */
    @Excel(name = "店铺名称(数字、中文，英文(可混合，不可有特殊字符)，可修改)、不唯一")
    @NotBlank(message = "店铺名称(数字、中文，英文(可混合，不可有特殊字符)，可修改)、不唯一不能为空", groups = { AddGroup.class, EditGroup.class })
    private String storeName;

    /** 店铺门头logo */
    @Excel(name = "店铺门头logo")
    @NotBlank(message = "店铺门头logo不能为空", groups = { AddGroup.class, EditGroup.class })
    private String storeLogo;

    /** 店铺类型，供货商，进货门店 */
    @Excel(name = "店铺类型，供货商，进货门店")
    private Integer storeType;

    /** 店铺状态(-1:未开通 0: 停业中 1:营业中) */
    @Excel(name = "店铺状态(-1:未开通 0: 停业中 1:营业中)")
    @NotNull(message = "店铺状态(-1:未开通 0: 停业中 1:营业中)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long storeStatus;

    /** 联系人（店长） */
    @Excel(name = "联系人", readConverterExp = "店=长")
    @NotBlank(message = "联系人（店长）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String contactsOwner;

    /** 联系人电话 */
    @Excel(name = "联系人电话")
    @NotBlank(message = "联系人电话不能为空", groups = { AddGroup.class, EditGroup.class })
    private String contactsTel;

    /** 店铺电话 */
    @Excel(name = "店铺电话")
    private String storeTel;

    /** 每天营业时间段 */
    @Excel(name = "每天营业时间段")
    private String openTime;

    /** 店铺所在省份（描述） */
    @Excel(name = "店铺所在省份", readConverterExp = "描=述")
    private String province;

    /** 店铺所在城市（描述） */
    @Excel(name = "店铺所在城市", readConverterExp = "描=述")
    private String city;

    /** 店铺所在区域（描述） */
    @Excel(name = "店铺所在区域", readConverterExp = "描=述")
    private String area;

    /** 店铺详细地址 */
    @Excel(name = "店铺详细地址")
    private String addressDetail;

    /** 经纬度：xxxx,xxxxx */
    @Excel(name = "经纬度：xxxx,xxxxx")
    private String coordinate;

    /** 营业执照，存文件ID */
    @Excel(name = "营业执照，存文件ID")
    private String businessLicense;

    /** 商品起送价 */
    @Excel(name = "商品起送价")
    @NotNull(message = "商品起送价不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal stratDeliveryPrice;

    /** 业务员id */
    @Excel(name = "业务员id")
    private Long promoterId;

    /** 删除标志（0代表存在 1代表删除） */
    private Integer delFlag;

}
